package com.sphd.beautysalon.presenter;


import com.android.volley.VolleyError;
import com.sphd.beautysalon.info.ApplyForInfo;
import com.sphd.beautysalon.model.ApplyForModelImpl;
import com.sphd.beautysalon.view.ApplyForView;

import java.util.List;

/**
 * Created by Hu on 2017/01/04
 */

public class ApplyForPresenterImpl implements ApplyForPresenter {
    ApplyForModelImpl applyForModel;
    ApplyForView applyForView;

    public ApplyForPresenterImpl(ApplyForView applyForView) {
        this.applyForView = applyForView;
        applyForModel=new ApplyForModelImpl();
    }

    @Override
    public void addData(String url) {
    }

    @Override
    public void sendError(VolleyError error) {

    }

    @Override
    public void addPersonRecord(String url) {
        applyForModel.addPerRecord(url,this);
    }

    @Override
    public void sendPersonRecord(List<ApplyForInfo> applyForInfos) {
        applyForView.sendPersonRecord(applyForInfos);
        applyForView.dissLoading();
    }

    @Override
    public void sureMoney(String url) {
        applyForView.showLoading();
        applyForModel.setSureMoney(url,this);
    }

    @Override
    public void recRes(int res) {
        applyForView.recRes(res);
        applyForView.dissLoading();
    }

    @Override
    public void ratifyMoney(String url) {

    }
}